package p2000;

import java.util.Scanner;

public class Main2022海选女主角 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int m = scanner.nextInt();
            int n = scanner.nextInt();

            int total = m * n;
            int row = 0, col = 0, max = 0;
            int a = 1, b = 0;
            while (total-- > 0) {
                b++;
                int x = scanner.nextInt();
                int tmp = x;
                if (tmp < 0) {
                    tmp = -tmp;
                }

                if (max < 0) {
                    if (-max < tmp) {
                        row = a;
                        col = b;
                        max = x;
                    }
                } else {
                    if (max < tmp) {
                        row = a;
                        col = b;
                        max = x;
                    }
                }

                if (b == n) {
                    a++;
                    b = 0;
                }
            }

            System.out.println(row + " " + col + " " + max);
        }
    }

}
